import i18n from '@/i18n'
const { t, te } = i18n.global

export const generateTitle = (title, prefix = '') => {
  const n = prefix + title
  const hasKey = te(n)
  if (hasKey) {
    return t(n)
  }
  return title
}
